package com.tfswue.lsh.controller;

import com.tfswue.lsh.config.ResourceNotFoundException;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsultController {
    @GetMapping(value = "/student/findById",produces = MediaType.APPLICATION_JSON_VALUE)
    public String findById(@RequestParam Integer id) {
    String student =null;
    if (student == null){
        throw new ResourceNotFoundException("Student not found with id" + id);
    }
    return student;
    }
}
